package io;

import java.io.FileReader;
import java.io.IOException;

public class TestReader {
    public static void main(String[] args) {
        try(FileReader reader = new FileReader("d:/test.txt")){
            char[] chars = new char[8];
            int tmp;
            while((tmp = reader.read(chars)) != -1){
                System.out.print(new String(chars, 0, tmp));
            }
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
